#include "GameEffect.h"
#include "BaseSprite.h"
#include "Global.h"
#include "GameConstants.h"

USING_NS_CC;
GameEffect::GameEffect(void)
{
}


GameEffect::~GameEffect(void)
{

}

void GameEffect::InitEffect()
{

}

void GameEffect::HeroEffect1(CCLayer * layer,CCPoint position)
{
	BaseSprite *effct=BaseSprite::create();
	effct->spriteTag=SpriteTag::EffectTag;
	effct->InitFrameSet(1,16,"effect_01_00%d.png",s_female_hero_effct_01_Plist,SpriteAction::EffectAction);
	effct->setPosition(position);
	effct->setAnchorPoint(ccp(0.5,0));
	effct->SetCurrentAction(SpriteAction::EffectAction,CCCallFuncN::create(effct,callfuncN_selector(GameEffect::EffectEnd)));
	layer->addChild(effct,999);
}

void GameEffect::EffectEnd(CCNode * pSender)
{
	pSender->removeFromParentAndCleanup(true);
}
